import { Controller, Post, Body } from '@nestjs/common';
import { AuthService } from './auth.service';
// import { CreateAuthDto } from './dto/create-auth.dto';
import { CreateUserDto } from '../user/dto/create-user.dto';

@Controller('auth')
export class AuthController {
  constructor(private readonly authService: AuthService) {}

  // 注册
  @Post('/signup')
  signup(@Body() signupData: CreateUserDto) {
    return this.authService.signup(signupData);
  }

  // 登录
  @Post('/login')
  login(@Body() loginData: CreateUserDto) {
    return this.authService.login(loginData);
  }
}
